home *** CD-ROM | disk | FTP | other *** search
/ KeyGen Studio 2002 / KeyGen_Studio_2002.iso / Tutorials / Code Inside / Xcellent_tut1.txt < prev    next >
Encoding:
Text File  |  2001-09-21  |  7.2 KB  |  154 lines

  1. Hexen II and GL Hexen II tutor...
  2.  
  3.     by Xcellent for TrickSoft - "Software made free by us"
  4.  
  5. Hiya! Welcome to my tutor, this time we stop and think to the Hexen II
  6. protection, easy, but it's good to read this essay.
  7. Let's start!
  8.  
  9. Tools needed:
  10. W32Dasm 8.93 (www.crackstore.com)
  11. Any hexadecimal editor (www.crackstore.com have many!)
  12.  
  13. Hexen II tutor:
  14. Run Hexen II and..."You need to have the Hexen 2 CD in order to play!"
  15. Ok now don't panic, relax and run W32Dasm, open the h2.exe file located
  16. in the Hexen 2 directory. When disassembling is done, click in String Data
  17. References, a window will popup with the strings of the game, so now you'll
  18. do the usual, search for the message. Once you find it, double click on it,
  19. then you'll see something similar:
  20. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  21. |:0043F887(C)
  22. |
  23.  
  24. * Possible StringData Ref from Data Obj ->"You need to have the Hexen 2 CD "
  25.                                         ->"in order to play!"
  26.                                   |
  27. :0043F8FF C7058010480040DC4800    mov dword ptr [00481080], 0048DC40
  28. :0043F909 C70530E0470000000000    mov dword ptr [0047E030], 00000000
  29.  
  30. Now you may have thought that just noping the jump for this message the
  31. game will run successfully but, no. I've tried and haven't worked, just keep on
  32. following this tutor to find the right way to crack it. Getting back, we see that the
  33. message it's called from the address 43F887, so press SHIFT + F12 (Go to location),
  34. type 43F887 and press enter or click ok. Now you will see:
  35. * Referenced by a CALL at Address:
  36. |:004014EE    <- from where it's called
  37. |
  38. :0043F850 81EC140A0000            sub esp, 00000A14
  39. :0043F856 8D842414020000          lea eax, dword ptr [esp+00000214]
  40. :0043F85D 53                      push ebx
  41. :0043F85E 56                      push esi
  42. :0043F85F 57                      push edi
  43. :0043F860 55                      push ebp
  44. :0043F861 50                      push eax
  45. :0043F862 6800080000              push 00000800
  46.  
  47. * Reference To: KERNEL32.GetLogicalDriveStringsA, Ord:00F7h
  48.                                   |
  49. :0043F867 FF15E8C45700            Call dword ptr [0057C4E8]
  50. :0043F86D 8DAC2424020000          lea ebp, dword ptr [esp+00000224]
  51. :0043F874 8DBC2424020000          lea edi, dword ptr [esp+00000224]
  52. :0043F87B B9FFFFFFFF              mov ecx, FFFFFFFF
  53. :0043F880 2BC0                    sub eax, eax
  54. :0043F882 F2                      repnz
  55. :0043F883 AE                      scasb
  56. :0043F884 F7D1                    not ecx
  57. :0043F886 49                      dec ecx
  58. :0043F887 7476                    je 0043F8FF <- jump to error msg if no CD.
  59.  
  60. * Reference To: KERNEL32.GetVolumeInformationA, Ord:014Eh
  61.                                   |
  62. :0043F889 8B35E4C45700            mov esi, dword ptr [0057C4E4]
  63.  
  64. * Reference To: KERNEL32.GetDriveTypeA, Ord:00DEh
  65.                                   |
  66. :0043F88F 8B1DE0C45700            mov ebx, dword ptr [0057C4E0]
  67.  
  68. Look that the game check the CD in several ways. What we'll do is go
  69. to where this check is called, the address 4014EE. Press SHIFT + F12
  70. again, type 4014EE and press enter. Now you should see:
  71. :004014EE E85DE30300              call 0043F850 <- call cd-check
  72. :004014F3 5F                      pop edi
  73. :004014F4 5E                      pop esi
  74. :004014F5 5B                      pop ebx
  75. :004014F6 81C4BC010000            add esp, 000001BC
  76. :004014FC C3                      ret <- return to game if everything's ok
  77.  
  78. The thing we gonna change is that call to the cd-check, so now
  79. look at the bottom of the screen and you will see the offset:
  80. @Offset: 000008EEh. Ok the offset is 8EE. Launch your hexadecimal
  81. editor and open h2.exe, search for the 8EE offset and change E85DE30300
  82. for 9090909090. Done? Save the file. Run the game and...Phew!!! We made it!!
  83. Follow now the GL Hexen II solution:
  84.  
  85. Run GL Hexen II and..."You need to have the Hexen 2 CD in order to play!"
  86. Run W32Dasm and open glh2.exe, once disassembling is done, click on String
  87. Data References and search for the message, when you find it, double click it.
  88. You will see something like this:
  89. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  90. |:00404782(C) <- where it's called from
  91. |
  92.  
  93. * Possible StringData Ref from Data Obj ->"You need to have the Hexen 2 CD "
  94.                                         ->"in order to play!"
  95.                                   |
  96. :004047FA C705D8D2460038C94500    mov dword ptr [0046D2D8], 0045C938
  97. :00404804 C70548AF460000000000    mov dword ptr [0046AF48], 00000000
  98.  
  99. We see that this message is called from the address 404782. To go there,
  100. press SHIFT + F12, type 404782 and press enter. Now you will see:
  101. * Referenced by a CALL at Address:
  102. |:004382DE   <- where it's called from
  103. |
  104. :00404750 81EC140A0000            sub esp, 00000A14
  105. :00404756 8D842414020000          lea eax, dword ptr [esp+00000214]
  106. :0040475D 53                      push ebx
  107. :0040475E 56                      push esi
  108. :0040475F 57                      push edi
  109. :00404760 55                      push ebp
  110. :00404761 50                      push eax
  111. :00404762 6800080000              push 00000800
  112.  
  113. * Reference To: KERNEL32.GetLogicalDriveStringsA, Ord:00F7h
  114.                                   |
  115. :00404767 FF15A0B5E000            Call dword ptr [00E0B5A0]
  116. :0040476D 8DB42424020000          lea esi, dword ptr [esp+00000224]
  117. :00404774 B9FFFFFFFF              mov ecx, FFFFFFFF
  118. :00404779 8BFE                    mov edi, esi
  119. :0040477B 2BC0                    sub eax, eax
  120. :0040477D F2                      repnz
  121. :0040477E AE                      scasb
  122. :0040477F F7D1                    not ecx
  123. :00404781 49                      dec ecx
  124. :00404782 7476                    je 004047FA <- jump to error msg if no CD.
  125.  
  126. * Reference To: KERNEL32.GetDriveTypeA, Ord:00DEh
  127.                                   |
  128. :00404784 8B1D9CB5E000            mov ebx, dword ptr [00E0B59C]
  129.  
  130. * Reference To: KERNEL32.GetVolumeInformationA, Ord:014Eh
  131.                                   |
  132. :0040478A 8B2D84B5E000            mov ebp, dword ptr [00E0B584]
  133.  
  134. Well, you can see it's the same thing as in the non-gl version of the game,
  135. so, we will just nop that call and the game will work successfully, but we
  136. must know the offset, so press SHIFT + F12, type 4832DE and press enter.
  137. Now you should see if you typed it right:
  138. :004382DE E86DC4FCFF              call 00404750 <- call cd-check
  139. :004382E3 5F                      pop edi
  140. :004382E4 5E                      pop esi
  141. :004382E5 5B                      pop ebx
  142. :004382E6 81C4BC010000            add esp, 000001BC
  143. :004382EC C3                      ret <- procced with game if everything's ok
  144.  
  145. Just nop that call and the game will be FiX'Ed (Hello Static Vengeance!!). As the
  146. green bar is already in the call, just take a look at the offset: 376DE. Run your
  147. hexadecimal editor, open glh2.exe and search for the offset 376DE. Once you find
  148. it, change E86DC4FCFF to 9090909090 and save the file. Run the game and...YES!!
  149. Again it's cracked!! Thanx for you patience and, as always, if you got any question
  150. or anything just send me a e-mail. I will be happy to serve you!!
  151.  
  152. Xcellent - The Brazillian crack3r
  153. xcellent@bol.com.br
  154. www.tricksoft.net